<?php
$pacote = "classes/componentes";
$pathToThis = pathinfo(__FILE__);
$root = substr($pathToThis['dirname'], 0, strlen($pathToThis['dirname']) - strlen($pacote) - 1);

require_once $root."/classes/base/Componente.class.php";

class InputSubmitWithValue extends Componente
{
	public function InputSubmitWithValue($label, $value, $classStyle = "InputSubmit")
	{
		$this->setLabel($label);
		$this->setValor($value);
		$this->setClassStyle($classStyle);
	}
    
	public function render($nome, $form)
	{
		$ret = '<input type="submit" value="'.$this->getLabel().'" ';
		$ret .= 'name="'.$nome.'" id="'.$nome.'" ';
		$ret .= 'class="'.$this->getClassStyle().'" ';
		if (!$this->getHabilitado())
			$ret .= 'disabled ';
		$ret .= '/>';
		return $ret;
	}
}
?>